package com.ccx.coachsite.util;


import android.util.Log;

public class LogUtil {
	public static final int VERBOSE = 0;
	public static final int DEBUG = 1;
	public static final int INFO = 2;
	public static final int WARNING = 3;
	public static final int ERROR = 4;
	public static final int NO_LOG = 5;

	private static int LOG_LEVEL = VERBOSE;

	public static void setLogLevel(int level) {
		LOG_LEVEL = level;
	}
	// verbose
	public static void v(String tag, String msg) {
		if (VERBOSE < LOG_LEVEL)
			return;
		Log.v( tag,msg);
	}
	// debug
	public static void d(String tag, String msg) {
		if (DEBUG < LOG_LEVEL)
			return;
		Log.d( tag,msg);
	}

	// info
	public static void i(String tag, String msg) {
		if (INFO < LOG_LEVEL)
			return;
		Log.i( tag,msg);
	}

	// warning
	public static void w(String tag, String msg) {
		if (WARNING < LOG_LEVEL)
			return;
		Log.w( tag,msg);
	}

	// error
	public static void e(String tag, String msg) {
		if (ERROR < LOG_LEVEL)
			return;
		Log.e( tag,msg);
	}
}
